home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-11 | 15.0 KB | 679 lines | [TEXT/MPS ] |
- /*
- File: Cappuccino.r
-
- Contains: Cappuccino Resources
-
- Written by: Steve Smith and Troy Gaul
-
- Copyright: © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- #define SystemSevenOrBetter 1 // we want the extended types
- #define SystemSevenOrLater 1 // Types.r uses this variable
-
- #define qRezzing 1 // Flag for our Def file.
-
- // -- MPW Rez Includes --
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "CodeFragmentTypes.r"
-
- // -- OpenDoc Includes --
-
- #ifndef __ODTYPES_R__
- #include "ODTypes.r"
- #endif
-
- #ifndef SOM_Module_OpenDoc_StdDefs_defined
- #include "StdDefs.r"
- #endif
-
- // -- Cappuccino Includes --
-
- #ifndef _CAPPUCCINODEF_
- #include "CappuccinoDef.h"
- #endif
-
- #ifndef _CAPPUCCINOVERS_
- #include "CappuccinoVers.h"
- #endif
-
- //------------------------------------------------------------------------------
- // .rsrc resources
- //------------------------------------------------------------------------------
-
- // Cappuccino - This gets the resources from my .rsrc file (PICTs etc.)
- include "CappuccinoOtherResources.rsrc" not 'ckid';
-
- // Since we use the Print Manager library, we need to includes its resources.
- include "PrintManager.rsrc" not 'ckid';
-
- //------------------------------------------------------------------------------
- // AETE resources
- //------------------------------------------------------------------------------
-
- #include "CappuccinoAETE.r"
- #include "CappuccinoBalloons.r"
-
- //------------------------------------------------------------------------------
- // Finder Version Resources
- //------------------------------------------------------------------------------
-
- // Part's Finder Version Resource
-
- resource 'vers' (1)
- {
- currentMajorVersion,
- finderMinorVersion,
- developmentStage,
- preReleaseNumber,
- verUS,
- shortVersionStr,
- shortVersionStr", © Apple Computer, Inc. 1994-1995"
- };
-
- resource 'vers' (2)
- {
- currentMajorVersion,
- finderMinorVersion,
- developmentStage,
- preReleaseNumber,
- verUS,
- shortVersionStr,
- "OpenDoc™ Sample Code"
- };
-
- //------------------------------------------------------------------------------
- // Code Fragment Resources
- //------------------------------------------------------------------------------
-
- resource 'cfrg' (0)
- {
- { /* [1] */
- #ifdef _68KBUILD_
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- currentVersion,
- compatibleVersion,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- kCappuccinoID, // This must be the class ID.
-
- /* [2] */
- #ifdef _68KBUILD_
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- currentVersion,
- compatibleVersion,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- kPartClassName // This must be the SOM class name for this part. */
- }
- };
-
- //------------------------------------------------------------------------------
- // NMAP Resources
- //------------------------------------------------------------------------------
-
- // Map a part's class id (module::classname)
- // to a part's kind (unique content identifier)
- resource kODNameMappings (kEditorKindMapId)
- {
- kODEditorKinds,
- { /* array Types: 1 elements */
- /* [1] */
- kCappuccinoID,
- kODIsAnISOStringList
- {
- { /* array ClassIDs: 1 elements */
- /* [1] */
- kCappuccinoKind
- }
- }
- }
- };
-
- // Map a part's class id (module::classname)
- // to a human readable string.
- resource kODNameMappings (kEditorUserStringMapId)
- {
- kODEditorUserString,
- { /* array Types: 1 elements */
- /* [1] */
- kCappuccinoID,
- kODIsINTLText
- {
- smRoman,
- langEnglish,
- kCappuccinoEditorUserString
- }
- }
- };
-
- // Map a part's kind (unique content identifier)
- // to a generic content category identifier.
- resource kODNameMappings (kKindCategoryMapId)
- {
- kODKind,
- { /* array Types: 1 elements */
- /* [1] */
- kCappuccinoKind,
- kODIsAnISOStringList
- {
- { /* array ClassIDs: 1 elements */
- /* [1] */
- kCappuccinoCategory
- }
- }
- }
- };
-
- // Map a part's kind (unique content identifier)
- // to a human readable string.
- resource kODNameMappings (kKindUserStringMapId)
- {
- kODKindUserString,
- { /* array Types: 1 elements */
- /* [1] */
- kCappuccinoKind,
- kODIsINTLText
- {
- smRoman,
- langEnglish,
- kCappuccinoKindUserString
- }
- }
- };
-
- // Map a part's generic content category identifier
- // to a human readable string.
- /*
- // This nmap is not used because we (like a good part), use one
- // of the standard categories listed in StdDefs.idl.
-
- resource kODNameMappings (kCategoryUserStringMapId)
- {
- kODCategoryUserString,
- { // array KeyList: 1 elements
- // [1]
- kCappuccinoCategory,
- kODIsINTLText {
- smRoman,
- langEnglish,
- kCappuccinoCategoryUserString
- }
- }
- };
-
- */
-
- // Map a part's kind (unique content identifier)
- // to an old style MacOS Type (and/or ScrapType).
- resource kODNameMappings (kOldMacOSTypeMapId)
- {
- kODKindOldMacOSType,
- { /* array KeyList: 1 elements */
- /* [1] */
- kCappuccinoKind,
- kODIsMacOSType {
- kCappuccinoDocumentOSType
- }
- }
- };
-
-
- // Map a part's class id (module::classname) to
- // the data/file OSTypes the part supports.
- resource kODNameMappings (kPlatformEditorKindMapId)
- {
- kODEditorPlatformKind,
- { /* array KeyList: 1 element */
- /* [1] */
- kCappuccinoID,
- kODIsPltfmTypeSpac {
- /* array PltfmTypeSpacList: 3 elements */
- {
- /* [1] */
- kODPlatformDataType,
- kTextDataKind,
- smRoman,
- langEnglish,
- kTextDataKindUserString,
- kODCategoryPlainText,
- }
- }
- }
- };
-
- //------------------------------------------------------------------------------
- // OLE Interoperability Support
- //------------------------------------------------------------------------------
-
- // This resource allows your editor to be registered with the OLE runtime on the
- // Macintosh and subsequently interoperate with OLE clients/servers. Contact Microsoft
- // to acqiure a unique class ID.
- resource 'olcr' (0, "OLE Class ID")
- {
- "{80C11F40-7503-8576-00D01113F11}"; /* your part's CLSID */
- };
-
- //------------------------------------------------------------------------------
- // String Resources
- //------------------------------------------------------------------------------
-
- resource 'STR ' (kDefaultStringID)
- {
- "Cappuccino"
- };
-
- resource 'STR#' (kMenuStringResID, "Menu item strings")
- {
- { /* array StringArray: 1 element */
- /* [1] */
- "About Cappuccino…"
- }
- };
-
- //------------------------------------------------------------------------------
- // Error strings
- //------------------------------------------------------------------------------
-
- resource 'STR#' (kErrorStringResID, "Error strings")
- {
- { /* array StringArray: 6 elements */
- /* [1] */
- "“Cappuccino” was unable completely initialize "
- "its internal structures.",
- /* [2] */
- "“Cappuccino” was unable to open the document "
- "due to unforseen circumstances.",
- /* [3] */
- "“Cappuccino” was unable to open a part window "
- "due to unforseen circumstances.",
- /* [4] */
- "“Cappuccino” has been asked to remove a "
- "frame that does not belong to it, or an "
- "error occurred while removing the frame "
- "from internal storage.",
- /* [5] */
- "A window that “Cappuccino” created has been "
- "deleted without its knowledge. This may "
- "generate a fatal error in the near future. "
- "Please close the document immediately to "
- "prevent data loss.",
- /* [6] */
- "“Cappuccino” encountered a fatal error while "
- "trying to save. Try saving again or closing "
- "the document.",
- /* [7] */
- "You can’t edit content at a link destination. "
- "You can either edit this content at its source or "
- "break the link to edit it at the destination.",
- /* [8] */
- "The Speech Manager had encountered an error while "
- "trying to speak the text. Try closing other documents "
- "or applications to increase available memory."
- }
- };
-
- //------------------------------------------------------------------------------
- // Undo/Redo strings
- //------------------------------------------------------------------------------
-
- resource 'STR#' (kActionStringResID, "Action strings")
- {
- {
- "Undo Cut",
- "Redo Cut",
- "Undo Paste",
- "Redo Paste",
- "Undo Clear",
- "Redo Clear",
- "Undo Drag",
- "Redo Drag",
- "Undo Drop",
- "Redo Drop",
- "Undo Set Text",
- "Redo Set Text",
- "Undo Change Settings",
- "Redo Change Settings"
- }
- };
-
- //------------------------------------------------------------------------------
- // Finder Related Resources
- //------------------------------------------------------------------------------
-
- // Kind resources affect the text Finder displays in the
- // "kind" column and file info dialog. This feature was
- // introduced as part of Macintosh Easy Open.
- //
- resource 'kind' (kBaseResourceID)
- {
- kCappuccinoEditorOSType,
- 0, /* region = USA */
- {
- 'shlb', "OpenDoc™ editor"
- }
- };
-
- resource 'kind' (kBaseResourceID+1)
- {
- kCappuccinoViewerOSType,
- 0, /* region = USA */
- {
- 'shlb', "OpenDoc™ viewer"
- }
- };
-
- resource 'kind' (kBaseResourceID+2)
- {
- kODShellSignature,
- 0, /* region = USA */
- {
- kCappuccinoDocumentOSType, "Cappuccino 1.0 document",
- kCappuccinoStationeryOSType, "Cappuccino 1.0 stationery"
- }
- };
-
- // The -16397 string will be displayed by Finder when a user
- // tries to open the editor shared library. The string should
- // give the user a little detail about the part's capabilities
- // and enough information to install the part in the correct location.
- //
- resource 'STR ' (-16397, purgeable)
- {
- "OpenDoc™ editor\n\n“Cappuccino” demonstrates the functionality of a very "
- "basic part. To work properly, it should be placed in the Editors folder. "
- "To create a new document, open a stationery pad."
- };
-
- //------------------------------------------------------------------------------
- // Dialog Resources
- //------------------------------------------------------------------------------
-
- resource 'DLOG' (kAboutBoxID, "Cappuccino About Box")
- {
- {0, 0, 250, 350},
- dBoxProc,
- invisible,
- goAway,
- 0x0,
- kAboutBoxID,
- "",
- alertPositionMainScreen
- };
-
- resource 'DITL' (kAboutBoxID)
- {
- { /* array DITLarray: 8 elements */
- /* [1] */
- {222, 270, 242, 338}, Button { enabled, "OK" },
- /* [2] */
- {24, 25, 56, 57}, Icon { disabled, kEditorIconPicture },
- /* [3] */
- {13, 68, 237, 69}, Button { disabled, "" },
- /* [4] */
- {64, 13, 65, 337}, Button { disabled, "" },
- /* [5] */
- {46, 76, 62, 172}, StaticText { disabled, "Cappuccino" },
- /* [6] */
- {76, 76, 116, 304}, StaticText { disabled,
- "Cappuccino is a sample part editor which "
- "illustrates the functionality of a basic "
- "part editor." },
- /* [7] */
- {124, 76, 152, 304}, StaticText { disabled,
- "Written by Steve Smith and Troy Gaul with support from "
- "the OpenDoc™ Engineering team." },
- /* [8] */
- {172, 76, 200, 300}, StaticText { disabled,
- "Copyright © 1994 - 1995 by Apple Computer, Inc. "
- "All Rights Reserved." },
- /* [9] */
- {51, 272, 64, 340}, StaticText { disabled,
- "Version "shortVersionStr }
- }
- };
-
- resource 'dctb' (kAboutBoxID)
- {
- /* dialog background fill color */
- { /* array ColorSpec: 5 elements */
- /* [1] */
- wContentColor, 59127, 59127, 59127,
- /* [2] */
- wFrameColor, 0, 0, 0,
- /* [3] */
- wTextColor, 0, 0, 0,
- /* [4] */
- wHiliteColor, 0, 0, 0,
- /* [5] */
- wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- data 'ictb' (kAboutBoxID)
- {
- /* dialog control text styling */
- $"0000000000000000002800240028"
- $"004C80070074800700888007009C"
- $"800700B0800700C4000000000000"
- $"000300007FFF7FFF7FFF0001FFFF"
- $"FFFFFFFF00020000000000000003"
- $"FFFFFFFFFFFF0000000000000003"
- $"00007FFF7FFF7FFF0001FFFFFFFF"
- $"FFFF00020000000000000003FFFF"
- $"FFFFFFFF00D80100000E00000000"
- $"0000FFFFFFFFFFFF000000E10000"
- $"0009000000000000FFFFFFFFFFFF"
- $"000000E800000009000000000000"
- $"FFFFFFFFFFFF000000EF00000009"
- $"000000000000FFFFFFFFFFFF0000"
- $"00F600000009000000000000FFFF"
- $"FFFFFFFF00000850616C6174696E"
- $"6F0647656E6576610647656E6576"
- $"610647656E6576610647656E6576"
- $"61"
- };
-
- resource 'DLOG' (kErrorBoxID, "Cappuccino Error Box")
- {
- {57, 46, 244, 374},
- dBoxProc,
- invisible,
- goAway,
- 0x0,
- kErrorBoxID,
- "",
- alertPositionParentWindowScreen
- };
-
- resource 'DITL' (kErrorBoxID)
- {
- { /* array DITLarray: 5 elements */
- /* [1] */
- {153, 256, 173, 314}, Button { enabled, "OK" },
- /* [2] */
- {153, 185, 173, 243}, Button { enabled, "Cancel" },
- /* [3] */
- {11, 70, 124, 317}, StaticText { disabled,
- "<< Use this for errors in the Editor, su"
- "ch as out of memory, unable to acquire s"
- "ome system resource, etc.>> \nUser errors"
- " use a standard alert appearance. See DI"
- "TL 129.>>" },
- /* [4] */
- {11, 19, 43, 51}, Icon { disabled, kEditorIconPicture },
- /* [5] */
- {149, 252, 177, 318}, UserItem { disabled }
- }
- };
-
-
- //------------------------------------------------------------------------------
- // Settings dialog resources
- //------------------------------------------------------------------------------
- // The resources for the dialog "kSettingsDialogID" can be found in the
- // Cappuccino.rsrc file, since they are graphically oriented.
-
- #define Geneva 3
-
- resource 'finf' (kDialogFontInfoID, "Dialog Font Info")
- {
- { /* array Fonts: 1 element */
- /* [1] */
- Geneva, plain, 10,
- }
- };
-
- //------------------------------------------------------------------------------
- // Menu Resource
- //------------------------------------------------------------------------------
-
- resource 'MENU' (kMiscMenuID)
- {
- kMiscMenuID,
- textMenuProc,
- 0b11111111111111111111111111111101,
- enabled,
- "Misc",
- {
- "Speak", noIcon, noKey, noMark, plain,
- #ifndef qViewerBuild
- "-", noIcon, noKey, noMark, plain,
- "Set Text…", noIcon, "T", noMark, plain,
- "Settings…", noIcon, noKey, noMark, plain
- #endif
- }
- };
-
- resource 'MENU' (kFontPopupMenuID)
- {
- kFontPopupMenuID,
- 3,
- allEnabled,
- enabled,
- "FontPopup",
- {
- }
- };
-
- //------------------------------------------------------------------------------
- // Finder Bundle Information
- //------------------------------------------------------------------------------
-
- resource 'BNDL' (kDocumentBundle, "Document BNDL")
- {
- kODShellSignature,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, kDocumentFREF,
- /* [2] */
- 1, kStationeryFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 2 elements */
- /* [1] */
- 0, kDocumentIcons,
- /* [2] */
- 1, kStationeryIcons
- }
- }
- };
-
- resource 'BNDL' (kEditorBundle, "Editor BNDL")
- {
- kCappuccinoEditorOSType,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kEditorFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kEditorIcons
- }
- }
- };
-
- resource 'BNDL' (kViewerBundle, "Viewer BNDL")
- {
- kCappuccinoViewerOSType,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'FREF',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kViewerFREF
- },
- /* [2] */
- 'ICN#',
- { /* array IDArray: 1 elements */
- /* [1] */
- 0, kViewerIcons
- }
- }
- };
-
- resource 'FREF' (kDocumentFREF)
- {
- kCappuccinoDocumentOSType, 0, ""
- };
-
- resource 'FREF' (kStationeryFREF)
- {
- kCappuccinoStationeryOSType, 1, ""
- };
-
- resource 'FREF' (kEditorFREF)
- {
- 'shlb', 0, ""
- };
-
- resource 'FREF' (kViewerFREF)
- {
- 'shlb', 0, ""
- };
-
- data kODShellSignature (0, "Owner resource")
- {
- $"00"
- };
-
- data kCappuccinoViewerOSType (0, "Owner resource")
- {
- $"00"
- };
-
- data kCappuccinoEditorOSType (0, "Owner resource")
- {
- $"00"
- };
-